#ifndef _DEFINE_H_
#define _DEFINE_H_

#include <stdlib.h>

//#include "stm32f2xx.h"

/* Exported macro ------------------------------------------------------------*/
#ifndef NULL
  #define NULL      (void *) 0
#endif


typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned char u8;
typedef WORD u16;
typedef unsigned int u32;
typedef char s8;
typedef short s16;
typedef int s32;

typedef long long u64;
typedef volatile unsigned int vu32;


//typedef enum {false=0, true=1} bool;

#ifndef FALSE
#define FALSE false
#endif

#ifndef TRUE
#define TRUE true
#endif

#define U8_MAX     ((u8)255)
#define S8_MAX     ((s8)127)
#define S8_MIN     ((s8)-128)
#define U16_MAX    ((u16)65535u)
#define S16_MAX    ((s16)32767)
#define S16_MIN    ((s16)-32768)
#define U32_MAX    ((u32)4294967295uL)
#define S32_MAX    ((s32)2147483647)
#define S32_MIN    ((s32)-2147483648)

#define ABS(x) ((x)<0?-(x):(x))





#define SYS_CFG_PRINTF_INFO

#ifdef SYS_CFG_PRINTF_INFO
#define info(format,arg...)  printf("#"format"\r\n",##arg)
#else
#define info(format,arg...)
#endif


#define LOG_ERROR(format, arg...) printf("Error: "format"\r\n", ##arg)

#if 1
#define DEBUG_UART_1 0
#else
#define DEBUG_UART_1 1
#endif



typedef struct {
	int left;
	int right;
	int top;
	int bottom;	
} CRect;


typedef void (*CallbackFunc) (void); 

typedef int (*int_Func_void)(void);



typedef struct _CrossDeviceList {
	char *name;
	struct _CrossDeviceList *next;
} CrossDeviceList;


//#define ENABLE_DEBUG_TBAR 1








#endif

